package com.itcaius.myandroidhomework.utils;

import androidx.room.TypeConverter;

public class GenderConverter {
    @TypeConverter
    public static String fromGender(Gender gender) {
        return gender != null ? gender.name() : null;
    }

    @TypeConverter
    public static Gender toGender(String name) {
        return name != null ? Gender.valueOf(name) : null;
    }
}
